#ifndef PORT_EXIT_H
#define PORT_EXIT_H

#include <stdint.h>
#include "port_config.h"

typedef enum {
    EXIT_INTR_DISABLE = 0,     /*!< Disable GPIO interrupt                             */
    EXIT_INTR_POSEDGE = 1,     /*!< GPIO interrupt type : rising edge                  */
    EXIT_INTR_NEGEDGE = 2,     /*!< GPIO interrupt type : falling edge                 */
    EXIT_INTR_ANYEDGE = 3,     /*!< GPIO interrupt type : both rising and falling edge */
    EXIT_INTR_LOW_LEVEL = 4,   /*!< GPIO interrupt type : input low level trigger      */
    EXIT_INTR_HIGH_LEVEL = 5,  /*!< GPIO interrupt type : input high level trigger     */
    EXIT_INTR_MAX,
} exit_int_trigger_t;

void exit_init(uint8_t ch, Pv_func_t cbk_func, exit_int_trigger_t trigger);
void exit_cmd(uint8_t ch, uint8_t enable);
void exit_set_trigger_mode(uint8_t ch, exit_int_trigger_t trigger);

#endif /* PORT_EXIT_H */